#include <stdio.h>
#include "head.h"

void TestINI(){
  //const char* path = "config.ini";
  char* password = parseINI("password", NULL);
  if (password) {
    printf("password=%s\n", password);
  } else {
    printf("Key 'password' not found.\n");
  }

  char* log = parseINI("log", NULL);
  if (log) {
    printf("log=%s\n", log);
  } else {
    printf("Key 'log' not found.\n");
  }

}

void test_logging() {
  initLog();

  INFO_LOG("This is an info message.");
  DEBUG_LOG("This is a debug message.");
  WARN_LOG("This is a warning message.");
  ERROR_LOG("This is an error message with code: %d", ERROR0);

  // 关闭日志文件
  closeLog();
}

int main(void) {

  test_logging();


  return 0;
}
